package com.zzyl.service.impl;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.zzyl.base.PageResponse;
import com.zzyl.entity.NursingProject;
import com.zzyl.mapper.NursingprojectMapper;
import com.zzyl.service.NursingprojectService;
import com.zzyl.vo.NursingProjectVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class NursingprojectServiceimpl implements NursingprojectService {
    @Autowired
    private NursingprojectMapper nursingprojectMapper;
    @Override
    public PageResponse<NursingProjectVo> queryPage(String name, Integer pageNum, Integer pageSize, Integer status) {
        PageHelper.startPage(pageNum, pageSize);
        Page<NursingProject> nursingProjects = nursingprojectMapper.queryPage(name,status);
        PageResponse<NursingProjectVo> nursingProjectVoPageResponse = PageResponse.of(nursingProjects, NursingProjectVo.class);
        return nursingProjectVoPageResponse;
    }
}
